package com.engiu.test.client.dialog;

import com.engiu.test.client.ProgressBar;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.event.dom.client.KeyUpEvent;

public class PopupProgressBar extends Composite implements ProgressBarInterface {

	private static PopupProgressBarUiBinder uiBinder = GWT
			.create(PopupProgressBarUiBinder.class);

	@UiField
	ProgressBar progressBar3;
	@UiField
	Button okButton;
	@UiField
	DialogBox dialogBox;
	@UiField
	VerticalPanel vpanel;
	

	interface PopupProgressBarUiBinder extends
			UiBinder<Widget, PopupProgressBar> {
	}

	public PopupProgressBar() {
		initWidget(uiBinder.createAndBindUi(this));
			dialogBox.setAnimationEnabled(true);
			dialogBox.setAutoHideEnabled(false);
			dialogBox.setModal(false);
			progressBar3.setWidth("95%");
	}

	@UiHandler("okButton")
	void handleClick(ClickEvent e) {
		dialogBox.hide();
	}

	public ProgressBar getProgressBar() {
		return progressBar3;
	}

	public void show() {
		dialogBox.show();
	}


}
